package com.zhongkai.model3;

import org.hibernate.annotations.GenericGenerator;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Objects;

@Entity
@Table(name = "supplier",    catalog = "")
public class Supplier implements Serializable {
    private Long id;
    private String supUuid;
    private String supName;
    private String supAddress;
    private String supAttn;
    private String supPhone;
    private String supMail;
    private Long supTime;
    private String supRemove;
    private String sup_comment;

    private String supRemark; //备注

    @Basic
    @Column(name = "sup_remark")
    public String getSupRemark() {
        return supRemark;
    }

    public void setSupRemark(String supRemark) {
        this.supRemark = supRemark;
    }

    @Basic
    @Column(name = "sup_comment")
    public String getSup_comment() {
        return sup_comment;
    }

    public void setSup_comment(String sup_comment) {
        this.sup_comment = sup_comment;
    }

    @Id
    @GenericGenerator(name = "generator", strategy = "increment")
    @GeneratedValue(generator = "generator")
    @Column(name = "id")
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    @Basic
    @Column(name = "sup_uuid")
    public String getSupUuid() {
        return supUuid;
    }

    public void setSupUuid(String supUuid) {
        this.supUuid = supUuid;
    }

    @Basic
    @Column(name = "sup_name")
    public String getSupName() {
        return supName;
    }

    public void setSupName(String supName) {
        this.supName = supName;
    }

    @Basic
    @Column(name = "sup_address")
    public String getSupAddress() {
        return supAddress;
    }

    public void setSupAddress(String supAddress) {
        this.supAddress = supAddress;
    }

    @Basic
    @Column(name = "sup_attn")
    public String getSupAttn() {
        return supAttn;
    }

    public void setSupAttn(String supAttn) {
        this.supAttn = supAttn;
    }

    @Basic
    @Column(name = "sup_phone")
    public String getSupPhone() {
        return supPhone;
    }

    public void setSupPhone(String supPhone) {
        this.supPhone = supPhone;
    }

    @Basic
    @Column(name = "sup_mail")
    public String getSupMail() {
        return supMail;
    }

    public void setSupMail(String supMail) {
        this.supMail = supMail;
    }

    @Basic
    @Column(name = "sup_time")
    public Long getSupTime() {
        return supTime;
    }

    public void setSupTime(Long supTime) {
        this.supTime = supTime;
    }

    @Basic
    @Column(name = "sup_remove")
    public String getSupRemove() {
        return supRemove;
    }

    public void setSupRemove(String supRemove) {
        this.supRemove = supRemove;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Supplier supplier = (Supplier) o;
        return Objects.equals(id, supplier.id) &&
                Objects.equals(supUuid, supplier.supUuid) &&
                Objects.equals(supName, supplier.supName) &&
                Objects.equals(supAddress, supplier.supAddress) &&
                Objects.equals(supAttn, supplier.supAttn) &&
                Objects.equals(supPhone, supplier.supPhone) &&
                Objects.equals(supMail, supplier.supMail) &&
                Objects.equals(supTime, supplier.supTime) &&
                Objects.equals(supRemove, supplier.supRemove);
    }

    @Override
    public int hashCode() {

        return Objects.hash(id, supUuid, supName, supAddress, supAttn, supPhone, supMail, supTime, supRemove);
    }
}
